import Cookies from 'js-cookie'

const Token = 'hrsaas-token'

export function getToken(){
  return Cookies.get(Token)
}

export function setToken(payload){
  Cookies.set(Token,payload)
}

export function removeToken(){
  Cookies.remove(Token)
}

// 设置时间戳
const timeStamp = 'token-time'

export function setTimeStamp(){
  Cookies.set(timeStamp,Date.now())
}

export function getTimeStamp(){
  return Cookies.get(timeStamp)
}